"""多层感知机数据下载模块"""
from openi import openi_download_file
from launcher import get_project_root


download_dir = get_project_root()

# 定义下载函数，包含进度打印
def download_and_unzip_mlp_datasets(to_show=False):

    if not to_show:
        openi_download_file("enter/mlp_datasets", repo_type="dataset", local_dir=download_dir,
                            max_workers=10)
    else:
        openi_download_file("enter/mlp_datasets", repo_type="dataset", local_dir=download_dir,
                            max_workers=10)
    print('\n数据集下载和解压已完成')


def download_and_unzip_best_mlp_checkpoints():
    openi_download_file("enter/mlp_checkpoints", repo_type="dataset", local_dir=download_dir,
                        max_workers=10)
    print('\n数据集下载和解压已完成')

__all__ = ['download_and_unzip_mlp_datasets',
           'download_and_unzip_best_mlp_checkpoints']
